Post

Replies

Boosts

Views

Activity

Reply to com.Metal.CompletionQueueDispatch crash in Swift 6
Thanks to Quinn's extended explaination in another thread the problem is fixed by adding @Sendable to the Metal command queue command buffer's completion handler. The app is now running on Swift 6 commandBuffer.addCompletedHandler { @Sendable (_ commandBuffer)-> Swift.Void in ... The compiler team should consider adding information that can be used for correcting the problem. Right now the assert crash is completely cryptic to me and has no usable information about the cause. [(https://developer.apple.com/forums/thread/764777?answerId=807248022#807248022)]
3w
Reply to PHPhoto localIdentifier to cloudIdentifier conversion
New version (iOS 18.1.1) problem with cloudIdentifierMappings(forLocalIdentifiers:) is causing me dataStore errors. The method is now acting like it has a completionBlock return . The initial return is with an error result. Inspecting a little later in the debugger shows a changed return with the expected cloudIdentifiers. You would think that wrapping it in the NSManagedObjectContext.performAndWait would be a quick fix.. but on my first try performAndWait did not improve the situation. Any ideas??? THANKS
Nov ’24
Reply to CoreData result class has 'Sendable' warnings
My solution: Add a struct with the same var names as the CoreData Entity class. Add one more var to hold the NSManagedObjectID. Add a method (#asStruct) to copy all of the values in the Entity class to the struct. Everywhere the Entity class was used, change the reference to the new struct. Finally on the save operation use the NSManagedObjectID to get the managed object back from the data context and update the managed object values as needed from the struct. Only one of the 18 CoreData entity classes needed this fix. The other 17 lower level entities apparently did not cross the NSDiffableDataSourceSnapshot/Entity class isolation boundary and thus do not cause the 'Sendable' warning. It would be nice if the CoreData data model supported an option to create either a struct or an Entity class. This would (I guess) save a lot of code changes where two frameworks have interfaces.
Jun ’24
Reply to xCode 13 install causes iMac reboot
Fixed the issue and installed xCode 13 by deleting the Norton Security App. By the way - the new permission setting procedure to enable system extensions is interesting.. It is shutdown, restart into the OS Recovery environment, then enable kernel extensions from a Security Policy button. More than one confirming admin password entry is required. It's fine with me, I like security !
Sep ’21
Reply to Update to UITableViewDiffableDataSource row
After a nice discussion at a WWDC 2020 lab the solution has been found. And yes I did miss the simple way.. oh well, live and learn. The answer is that uiState is cached and the dataSource needs to be notified of the change. The missing line after updateItem.stateVar = true snapshot.reloadItems([updateItem]) Now apply the change dataSource.apply(snapshot) thank you Apple engineer ! Will
Jun ’20
Reply to Persistence of photo access permission ?
Apologies on the typo, I was asking about PHPicker. I recall something about a cloud identifier.. should that be used for persistent storage in the app context in place of local identifier? My app basically stores metadata of the ciFilter set and the image local identifier but does not save a new image. This is because localIdentifier is documented as “a unique string that persistently identifies the object” (class PHObject). Is this changing too?
Jun ’20